//
//  GKInteractiveTransitionTool.h
//  GKTranstionAnimation
//
//  Created by Apple on 16/11/16.
//  Copyright © 2016年 郭凯. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef enum : NSUInteger {//手势交互方向
    InteractiveTransitionGestureDirectionLeft = 0,
    InteractiveTransitionGestureDirectionRight,
    InteractiveTransitionGestureDirectionUp,
    InteractiveTransitionGestureDirectionDown
}InteractiveTransitionGestureDirection;

typedef enum : NSUInteger {//手势控制哪种转场
    InteractiveTransitionTypePresent = 0,
    InteractiveTransitionTypeDismiss,
    InteractiveTransitionTypePush,
    InteractiveTransitionTypePop
}InteractiveTransitionType;

@interface GKInteractiveTransitionTool : UIPercentDrivenInteractiveTransition

/**记录是否开始手势，判断pop操作是手势触发还是返回键触发*/
@property (nonatomic, assign) BOOL interation;
/**促发手势present的时候的config，config中初始化并present需要弹出的控制器*/
@property (nonatomic, copy) void (^presentConifg)();
/**促发手势push的时候的config，config中初始化并push需要弹出的控制器*/
@property (nonatomic, copy) void (^pushConifg)();

//初始化方法

+ (instancetype)interactiveTransitionWithTransitionType:(InteractiveTransitionType)type GestureDirection:(InteractiveTransitionGestureDirection)direction;
- (instancetype)initWithTransitionType:(InteractiveTransitionType)type GestureDirection:(InteractiveTransitionGestureDirection)direction;

/** 给传入的控制器添加手势*/
- (void)addPanGestureForViewController:(UIViewController *)viewController;

@end
